<?php
/**
 * Created by PhpStorm.
 * User: zyark
 * Date: 2018/3/26
 * Time: 15:24
 */

namespace app\admin\controller;


use app\common\controller\Backend;

/**
 * 后台ajax获取数据
 * Class AdminPublic
 * @package app\admin\controller
 */
class AdminPublic extends Backend
{
    /**
     * ajax获取分类列表
     * @return \think\response\Json
     */
    public function ajax_category_list(){
        $parent_id = $this->request->param('parent_id');
        $map['parent_id'] = $parent_id;
        $list = model('Category')->where($map)->select();
        return json($list);
    }
}